libxl/arm: Fix build on arm64 + acpi w/ gcc 8.2
authorChristopher Clark <christopher.w.clark@gmail.com>
Thu, 16 Aug 2018 20:22:41 +0000 (13:22 -0700)
committerIan Jackson <ian.jackson@citrix.com>
Fri, 5 Oct 2018 17:23:31 +0000 (18:23 +0100)
commit1ab10eeeb94d622fb294d71e27ad02a770eda3de
treeab508ffc6f764b7a901b4bdeadf3aa76dac03ab5
parent128ea319cc229ae4088a49658254abfe9c7d1b92
libxl/arm: Fix build on arm64 + acpi w/ gcc 8.2

Add zero-padding to #defined ACPI table strings that are copied.
Provides sufficient characters to satisfy the length required to
fully populate the destination and prevent array-bounds warnings.
Add BUILD_BUG_ON sizeof checks for compile-time length checking.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
(cherry picked from commit b8f33431f3dd23fb43a879f4bdb4283fdc9465ad)
tools/libxl/libxl_arm_acpi.c